import request from '@/utils/request'
import qs from "querystring"
export default{

    //分页后根据字段查询
    getPages(pageNum, pageSize, seq){
        return request({
            url:'/api-order/return/cause/page',
            method:'get',
            params:{
                pageNum,
                pageSize,
                seq,
            }
        })
    },

    //添加
    adds(vo){
        var data=qs.stringify(vo)
        return request({
            url:'/api-order/return/cause/addCause',
            method:'post',
            data
        })
    },

    //编辑修改
    updateEdit(vo){
        var data=qs.stringify(vo)
        return request({
            url:'/api-order/return/cause/updates',
            method:'put',
            data
        })
    },

    //根据id单行删除
    deleteCause(id){
        return request({
            url:'/api-order/return/cause/deletes',
            method:'get',
            params:{
                id
            }
        })
    },

    //根据id批量删除
    deleteAllList(ids){
        var data=qs.stringify({ids});
        console.log(ids);
        return request({
            url:'/api-order/return/cause/deletesAll',
            method:'delete',
            data
        })
    },

}